export default function (config) {
  let needToken = ["/draw", "/compareface"];
  function verify(url) {
    return needToken.some((el) => {
      return config.url.includes(el);
    });
  }
  if (verify(config.url)) {
    config.header = {
      "x-token": wx.getStorageSync("token"),
    };
  }
  config.timeout = 5000;
  wx.request(config);
}
